//
//  HHCollectionView.m
//  Flower
//
//  Created by 花花 on 2016/12/5.
//  Copyright © 2016年 花花. All rights reserved.
//

#import "HHCollectionView.h"

@interface HHCollectionView ()


@property(nonatomic, copy) HHScrollViewShouldBeginPanGestureHandler getstureBeginHandler;

@end
@implementation HHCollectionView

-(void)setScrollViewShouldBeginPanGestureHandler:(HHScrollViewShouldBeginPanGestureHandler)gestureBeginHandler{
    _getstureBeginHandler = [gestureBeginHandler copy];
    

}

-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{

    if (_getstureBeginHandler && gestureRecognizer == self.panGestureRecognizer) {
        return _getstureBeginHandler(self,(UIPanGestureRecognizer *)gestureRecognizer);
    }
    return [super gestureRecognizerShouldBegin:gestureRecognizer];

}


@end
